package com.ebook.ui.activity;

import com.ebook.entity.Book;
import com.ebook.ui.fragment.bookfind.Keyword;
import com.ebook.ui.fragment.home.category.CategoryFragment;
import com.ebook.ui.sync.WorkSyncer;
import javax.swing.*;
import java.util.ArrayList;

public class BookFindActivity extends Activity{
    /**
     * 对于CategoryFragment,这个类可以与HomeActivity共享
     * 也可以向CategoryFragment额外添加构造函数,使得在HomeActivity和
     * 本类中显示不同行为,而不是通过判断顶层Activity的类型来使得CategoryFragment
     * 下的CategoryLink显示不同的行为.
     * **/
    private CategoryFragment categoryFragment;
    private JLabel preCode = new JLabel();
    JButton back = new JButton("回退");
    public BookFindActivity(ArrayList<Book> books) throws NoSuchFieldException, IllegalAccessException {
        super();
        this.add(preCode);
        preCode.setText("欢迎来到"+"分类下的书籍列表");
        preCode.setBounds(300,100,300,200);
        back.setBounds(300,300,300,200);
        this.add(back);
        back.addActionListener(e->{
            WorkSyncer.webView.popActivity();
        });
    }
    public void updateUiByCategory(String name) {

    }
}
